package com.hxx.day9;

public class TestDemo {
    public static void main(String[] args) {
        A a = new A();
        // 启动A线程
        a.start();
        // 启动B线程
        B b = new B();
        Thread t = new Thread(b);
        t.start();
    }
}

class A extends Thread{
    @Override
    public void run() {
        System.out.println("A线程运行");
    }
}

class B implements Runnable{
    @Override
    public void run() {
        System.out.println("B线程运行");
    }
}
